Optimal. Leaf size=36 \[ -\sqrt {\frac {\pi }{2}} S\left (\sqrt {\frac {2}{\pi }} \sqrt {x}\right )+\sqrt {x} \sin (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3377, 3386,
3432} \begin {gather*} \sqrt {x} \sin (x)-\sqrt {\frac {\pi }{2}} S\left (\sqrt {\frac {2}{\pi }} \sqrt {x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3377
Rule 3386
Rule 3432
Rubi steps
\begin {align*} \int \sqrt {x} \cos (x) \, dx &=\sqrt {x} \sin (x)-\frac {1}{2} \int \frac {\sin (x)}{\sqrt {x}} \, dx\\ &=\sqrt {x} \sin (x)-\text {Subst}\left (\int \sin \left (x^2\right ) \, dx,x,\sqrt {x}\right )\\ &=-\sqrt {\frac {\pi }{2}} S\left (\sqrt {\frac {2}{\pi }} \sqrt {x}\right )+\sqrt {x} \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.00, size = 48, normalized size = 1.33 \begin {gather*} \frac {\sqrt {-i x} \text {Gamma}\left (\frac {3}{2},-i x\right )+\sqrt {i x} \text {Gamma}\left (\frac {3}{2},i x\right )}{2 \sqrt {x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 27, normalized size = 0.75
method | result | size |
derivativedivides | \(-\frac {\mathrm {S}\left (\frac {\sqrt {2}\, \sqrt {x}}{\sqrt {\pi }}\right ) \sqrt {2}\, \sqrt {\pi }}{2}+\sin \left (x \right ) \sqrt {x}\) | \(27\) |
default | \(-\frac {\mathrm {S}\left (\frac {\sqrt {2}\, \sqrt {x}}{\sqrt {\pi }}\right ) \sqrt {2}\, \sqrt {\pi }}{2}+\sin \left (x \right ) \sqrt {x}\) | \(27\) |
meijerg | \(\sqrt {2}\, \sqrt {\pi }\, \left (\frac {\sqrt {x}\, \sqrt {2}\, \sin \left (x \right )}{2 \sqrt {\pi }}-\frac {\mathrm {S}\left (\frac {\sqrt {2}\, \sqrt {x}}{\sqrt {\pi }}\right )}{2}\right )\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.52, size = 67, normalized size = 1.86 \begin {gather*} -\frac {1}{16} \, \sqrt {\pi } {\left (\left (i + 1\right ) \, \sqrt {2} \operatorname {erf}\left (\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \sqrt {x}\right ) + \left (i - 1\right ) \, \sqrt {2} \operatorname {erf}\left (\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {x}\right ) - \left (i - 1\right ) \, \sqrt {2} \operatorname {erf}\left (\sqrt {-i} \sqrt {x}\right ) + \left (i + 1\right ) \, \sqrt {2} \operatorname {erf}\left (\left (-1\right )^{\frac {1}{4}} \sqrt {x}\right )\right )} + \sqrt {x} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 26, normalized size = 0.72 \begin {gather*} -\frac {1}{2} \, \sqrt {2} \sqrt {\pi } \operatorname {S}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {\pi }}\right ) + \sqrt {x} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.51, size = 61, normalized size = 1.69 \begin {gather*} \frac {3 \sqrt {x} \sin {\left (x \right )} \Gamma \left (\frac {3}{4}\right )}{4 \Gamma \left (\frac {7}{4}\right )} - \frac {3 \sqrt {2} \sqrt {\pi } S\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {\pi }}\right ) \Gamma \left (\frac {3}{4}\right )}{8 \Gamma \left (\frac {7}{4}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.56, size = 53, normalized size = 1.47 \begin {gather*} -\left (\frac {1}{8} i - \frac {1}{8}\right ) \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {x}\right ) + \left (\frac {1}{8} i + \frac {1}{8}\right ) \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \sqrt {x}\right ) - \frac {1}{2} i \, \sqrt {x} e^{\left (i \, x\right )} + \frac {1}{2} i \, \sqrt {x} e^{\left (-i \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.03, size = 26, normalized size = 0.72 \begin {gather*} \sqrt {x}\,\sin \left (x\right )-\frac {\sqrt {2}\,\sqrt {\pi }\,\mathrm {S}\left (\frac {\sqrt {2}\,\sqrt {x}}{\sqrt {\pi }}\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________